package com.guigu.qingcheng.controller;

import com.guigu.qingcheng.pojo.vo.Goods;
import com.guigu.qingcheng.service.TbSpuService;
import com.guigu.qingcheng.utils.R;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("/tempaltes")
public class TemplateEngineController {
    @Resource
    private TbSpuService tbSpuService;

    @GetMapping("/createPage/{id}")
    public R createPage(@RequestParam String id){
        //查询商品信息
        Goods goods = tbSpuService.findGoodsById(id);
        return R.ok().message("查询成功").data("goods",goods);
    }
}
